# api/serializers.py
from rest_framework import serializers
from blogs.models import BlogArticle, BlogComment,BlogStats,BlogCategory
from users.models import BlogUser


class BlogUserSerializer(serializers.ModelSerializer):
    class Meta:
        model = BlogUser
        fields = '__all__'  # 包含其他你想要序列化的字段
class BlogArticleSerializer(serializers.ModelSerializer):
    class Meta:
        model = BlogArticle
        fields = '__all__'
class BlogCommentSerializer(serializers.ModelSerializer):
    class Meta:
        model = BlogComment
        fields = '__all__'
class BlogStatsSerializer(serializers.ModelSerializer):
    class Meta:
        model = BlogArticle
        fields = '__all__'

class BlogStatsSerializer(serializers.ModelSerializer):
    class Meta:
        model = BlogStats
        fields = '__all__'
class BlogCategorySerializer(serializers.ModelSerializer):
    class Meta:
        model = BlogStats
        fields = '__all__'